<?php
error_reporting(E_ERROR);
ini_set('date.timezone', 'Asia/Shanghai');
header("Content-type:text/html;charset=utf-8");
include_once './sqlhelp.php';
$sqlhelp = new \sqlhelp\sqlhelp();

$order_num = $_REQUEST['order_num'];
if($order_num){
    $sql = "select avatar from cmf_user WHERE user_login = '$order_num'";
    $rows = $sqlhelp->get_rows($sql);
}

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Index</title>
</head>
<body>
<form>
    <input type="text" name="order_num" id="ls_id">
    <button type="submit">查询</button>
</form>
<?php if(!empty($rows)){ ?>
        <?php foreach ($rows as $row){ ?>
    		<span id="sid"><?php echo $row['avatar'] ?></span>
        <?php }?>
<?php } ?>
<?php
	$get_name = $_GET["name"];
	echo $get_name;
?>
</body>
</html>
<script src="/static/hongbao/js/main.js"></script>
<script src="jquery-1.8.3.js"></script>
<script>
	var user_id = sessionStorage.getItem("id");
		alert(user_id)
	$("#ls_id").val(user_id);

</script>
